<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ page import="java.util.List" %>
<%@ page import="com.se.data.TagCount" %>

<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %> 

<jsp:useBean id="tagCounts" scope="request" type="java.util.List" />

<html>
  <head>
    <title>Popular Tags</title>
    <link type="text/css" rel="stylesheet" href="/stylesheets/main.css" />
    <meta http-equiv="content-type" content="text/html; charset=UTF-8" />
  </head>

  <body>
    <h1>Popular Tags</h1>
    <c:forEach var="tagCount" items="${tagCounts}">
      <p><a href="/list?tag=${tagCount.tag}"><c:out value="${tagCount.tag}" /></a> : <c:out value="${tagCount.count}" /></p>
    </c:forEach>
  </body>
</html>